<template>
	<div class="main-1" :style="'bottom: ' + bottom + 'px;'">
		<div class="warp" @click="handlerClick">{{ title }}</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {};
		},
		props: {
			title: {
				type: String,
				default: () => {
					return '';
				}
			},
			bottomPosition: {
				type: Number,
				default: () => {
					return 60;
				}
			}
		},
		methods: {
			handlerClick() {
				this.$emit('click', 1);
			}
		},
		computed: {
			bottom() {
				return uni.upx2px(this.bottomPosition)
			}
		}
	};
</script>

<style scoped lang="scss">
	.main-1 {
		width: 670upx;
		height: 80upx;
		position: fixed;
		bottom: 60upx;
		left: 50%;
		background: #fff;
		margin-left: calc(-670upx / 2);

		.warp {
			width: 670upx;
			height: 80upx;
			box-sizing: border-box;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #FFFFFF;
			font-size: 36upx;
			line-height: 1;
			border-radius: 100rpx;
			background: linear-gradient(180deg, #EC6A0A 0%, #FB8E26 100%);
			// font-weight: bold;
		}
	}
</style>